name: Labeling closed issues
on:
  issues:
    types: ['closed']

permissions:
  contents: read

jobs:
  automate-issues-labels:
    permissions:
      issues: write  # for andymckay/labeler to label issues
      pull-requests: write  # for andymckay/labeler to label PRs
    runs-on: ubuntu-latest
    if: github.repository == 'llvm/llvm-project'
    steps:
      - uses: andymckay/labeler@1.0.4
        with:
          remove-labels: 'awaiting-review'
